Heaven is the ultimate authority, the king of gods who should be admired by the king.  Dong Zhongshu

From its earliest forms Chinese religion has relied on priests and monks for spiritual guidance. During the Shang period beliefs centered around animism and ancestor worship. People believed in gods of the wind, sun, clouds, and moon. They also worshipped Shangdi, the preeminent god of human destiny and the forces of nature, and they invoked their ancestors to intercede with him. Priests relied on oracle bones to interpret Shangdis will, usually tortoise shells or the shoulder bones of cattle or oxen. They would write their questions on the bones, heat them, and watch and interpret the way they cracked.

Shangdi evolved into the Chinese concept of Heaven during the Zhou period, a sky-god and supreme moral force which gave the emperors power and legitimacy to rule. This Mandate of Heaven was the divine concord by which the emperors retained power and exercised justice. By the Han Dynasty Shangdi was synonymous with Heaven, and also equated with the Jade Emperor of Taoism.
